home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re(2) trouble with data linkin < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  2.0 KB  |  [TEXT/ttxt]

  1. Subject:     Re(2): trouble with data linking
  2. Sent:        9/10/96 7:31 AM
  3. Received:    9/10/96 7:31 AM
  4. From:        "Ken Grigsby" <grigsby@csi-health.com>
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. >>I'm having trouble getting linking to work. I'm trying to make a
  10. >>part displays one month of a calendar. I would like to link it with
  11. >>another instance of the same part so that when the user changes the
  12. >>month or year of the first, the second automatically updates to the
  13. >>month after the first. The calendar itself has no selectable content
  14. >>but I create a selection object that references the part content for
  15. >>enabling the Copy menu item and for the source link. After I put two
  16. >>instances of the calendar in ODF Table or ODF Draw, I copy the first,
  17. >>activate the second and "Paste Asä" with automatic linking and merge
  18. >>into contents selected. The second gets updated correctly at this
  19. >>point. But any changes made after this to the first are not propagated
  20. >>to the second (i.e. DoUpdateLink is not called). I am calling the
  21. >>presentation's ContentUpdated method when the data in the first is
  22. >>changed.
  23. >
  24. >It's unclear to me which part is managing the linking. Does your calendar
  25. part >subclass FW_CLinkManager, FW_CLinkSource, and FW_CLinkDestination? If
  26. not, 
  27. >you're relying on the linking support in the container part (ODFDraw or 
  28. >ODFTable). The linking code in the container part will paste the entire 
  29. >calendar part every time the link is updated. In other words, the 2nd
  30. calendar >part is created by the container's linking code, not you. It's a
  31. "live copy" 
  32. >of the 1st calendar part.
  33. >
  34. >My second question is, which part is handling the Paste As command? If it's
  35. the >calendar part, and it doesn't provide its own linking support, then
  36. you're not >actually creating a link but doing a simple paste.
  37. >
  38. >Mary Boetcher
  39. >ODF Person
  40.  
  41. Mary,
  42.  
  43. 1) Yes, my calendar part does subclass FW_CLinkManager, FW_CLinkSource, and
  44. FW_CLinkDestination.
  45.  
  46. 2) My frame creates a FW_CClipboardCommand to handle the Paste As.
  47.  
  48. Ken Grigsby